package database

import (
	"github.com/goravel/framework/contracts/database/schema"
	"github.com/goravel/framework/contracts/database/seeder"

	"goravel/database/migrations"
	"goravel/database/seeders"
)

type Kernel struct {
}

func (kernel Kernel) Migrations() []schema.Migration {
	return []schema.Migration{
		&migrations.M20250224075700CreateUsersTable{},
		&migrations.M20250224102226CreateRolesTable{}, //role
		&migrations.M20250224102854CreatePermissionsTable{},
		&migrations.M20250224103849CreateMenusTable{},
		&migrations.M20250224102523CreateUserRolesTable{},
		&migrations.M20250224103010CreateRolePermissionsTable{},
		&migrations.M20250224104246CreateMenuPermissionsTable{},
		&migrations.M20250224131211CreateAttachmentCategoryTables{},
		&migrations.M20250224131227CreateAttachmentsTable{},
		&migrations.M20250227062643CreateButtonPermissionsTable{},     //button_permission
		&migrations.M20250227062923CreateRoleButtonPermissionsTable{}, //中间表，role,button_permission
		&migrations.M20250303153206CreateSystemConfigTabTables{},
		&migrations.M20250303153232CreateSystemConfigTables{},
	}
}

func (kernel Kernel) Seeders() []seeder.Seeder {
	return []seeder.Seeder{
		&seeders.DatabaseSeeder{},
	}
}
